﻿module Sustainalytics.Navigation {

    export var navigationMenuDirectiveName = 'sustainalyticsNavigationMenu';

    function navigationMenuDirective() {

        return {

            restrict: 'EA',

            scope: {                
                siteMapCode: '@navigationMenuSitemap',
                startNodeCode: '@navigationMenuStartnodecode',
                startNodeLevel: '@navigationMenuStartnodelevel',
                displayLevels: '@navigationMenuLevels',
                templateUrl: '@navigationMenuTemplateurl'
            },

            controller: 'NavigationMenuController',
            controllerAs: 'navMenu',

            template: '<div ng-include="templateUrl"></div>',

            link: function (scope, element, attrs) {
            }
        };
    };

    angular.module(navigationModuleName).directive(navigationMenuDirectiveName, navigationMenuDirective);
} 